package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class DVDTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class DVDTest
{
    private ModelLayer.DVD dVD1;
    private ModelLayer.Copy copy1;

    

    /**
     * Default constructor for test class DVDTest
     */
    public DVDTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        dVD1 = new ModelLayer.DVD(1, "West", "Mogens", "24-12-2011");
        copy1 = new ModelLayer.Copy("11", "14-12-2011", 150);
        dVD1.addCopy(copy1);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testCreateDVD()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "West", "Mogens", "24-12-2011");
    }

    @Test
    public void testAddCopy()
    {
        dVD1.addCopy(copy1);
    }

    @Test
    public void testDeleteCopy()
    {
        dVD1.deleteCopy("11");
    }

    @Test
    public void testGetID()
    {
        assertEquals(1, dVD1.getId());
    }

    @Test
    public void testSearchCopy()
    {
        assertEquals(copy1, dVD1.searchCopy("11"));
    }

    @Test
    public void testSetArtist()
    {
        dVD1.setArtist("John");
    }

    @Test
    public void testSetReleaseDate()
    {
        dVD1.setReleaseDate("14-12-2011");
    }

    @Test
    public void testSetTitle()
    {
        dVD1.setTitle("East");
    }

    @Test
    public void testUpdateCopy()
    {
        dVD1.updateCopy("11", "14-12-2011", 200);
    }
}









